package com.caigou.repository;


import com.caigou.bean.es.EsBid;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.Optional;

/**
 * 接口关系：
 * ElasticsearchRepository --> ElasticsearchCrudRepository --> PagingAndSortingRepository --> CrudRepository
 */
public interface EsBidRepository extends ElasticsearchRepository<EsBid, String> {

    Optional<EsBid> findById(String id);
    
    EsBid getEsBidById(String id);
    
    Page<EsBid> findByTitle(String title, Pageable pageable);
    
//    Page<EsBid> findByProjectName(String projectName, Pageable pageable);
    
    
    
}
